home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
cdropin1.arc
/
WCA.C
< prev
Wrap
Text File
|
1985-10-02
|
1KB
|
30 lines
/* wca.c - write char and string with attr.- Blaise Ctools */
#include "stdio.h"
#include "screen.h"
int wca(c,a) /* write char and attribute */
int c ; /* char to write */
int a ; /* attribute to write */
{
switch( c )
{ /* check for control chars */
case '\r' : case '\n' : case 0x07 : case 0x08 :
break ;
default :
scattrib(a,0,c,1) ; /* Ctools function writes */
break ; /* char and attr. to screen */
} /* does not advance cursor */
scttywrt(c,0) ; /* Ctools function to write */
} /* char only and move cursor */
int wsa(s,a) /* write string with attribute */
char *s ; /* string pointer */
int a ; /* attribute */
{
while( *s != '\0' ) /* repeat until end of string */
{ wca(*s,a) ; /* use wca to write next char */
s = s + 1 ; /* advance pointer */
}
}